from django.shortcuts import render
from rest_framework.response import Response
from app.ser import StudentSerializer
from app.models import *
from rest_framework.views import APIView
# Create your views here.
class StudentViews(APIView):
    def get(self,request):
        students =StudentModel.objects.all()
        serializer = StudentSerializer(instance=students,many=True)
        return Response({'message':'查询成功了','students':serializer.data})